import request from "@/request/request";

export function login(username, password) {
    return request({
        url: '/user/login',
        method: 'GET',
        params: {
            'username': username,
            'password': password
        }
    })
}

export function register(username, password) {
    return request({
        url: '/user/register',
        method: 'POST',
        params: {
            'username': username,
            'password': password
        }

    })
}

export function logout() {
    return request({
        url: '/user/logout',
        method: 'get'
    })
}

export function getUserInfo() {
    return request({
        url: '/user/getInfo',
        method: 'GET'
    })
}